///**
// * 
// */
//package com.lastproject.web.filters;
//
//import java.io.IOException;
//import java.util.Map;
//
//import javax.faces.application.ResourceHandler;
//import javax.faces.application.ViewExpiredException;
//import javax.faces.context.FacesContext;
//import javax.servlet.Filter;
//import javax.servlet.FilterChain;
//import javax.servlet.FilterConfig;
//import javax.servlet.ServletException;
//import javax.servlet.ServletRequest;
//import javax.servlet.ServletResponse;
//import javax.servlet.annotation.WebFilter;
//import javax.servlet.http.HttpServletRequest;
//import javax.servlet.http.HttpServletResponse;
//
///**
// * @author Alexandra
// *
// */
//@WebFilter(servletNames={"Faces Servlet"})
//public class RestrictBackFilter implements Filter {
//
//	@Override
//	public void destroy() {
//		
//	}
//
//	@Override
//	public void doFilter(ServletRequest request, ServletResponse response,
//			FilterChain chain) throws IOException, ServletException {
//		
//		try {
//		    chain.doFilter(request, response);
//		} catch (ServletException e) {
//		    if (e.getRootCause() instanceof ViewExpiredException) {
//		    	request.getRequestDispatcher("/login.xhtml").forward(request, response);
//		    	
//		    } else {
//		        throw e;
//		    }
//		}
//        
//	}
//
//	@Override
//	public void init(FilterConfig arg0) throws ServletException {
//		
//	}
//
//}
